package com.zombies.list.linkedlist.doublelinkedlist;

import com.zombies.list.adt.MyList;

/**
 * @author zombies
 * @create 2022-04-22 12:10
 */
public class MyDoubleLikedListTest {
    public static void main(String[] args) {
        MyDoubleLikedList<String> list = new MyDoubleLikedList<>();
        list.add("a1");
        list.add("a2");
        list.add("a3");
        list.add("a4");
        list.add("a5");
        list.addFirst("abc");
        list.show();
        list.showReserver();

        list.clear();
//        MyList<String> reverseList = list.getReverseList();
//        reverseList.show();



//
//        System.out.println(list.getFirst());
//        System.out.println(list.removeFirst());
//        System.out.println(list.removeLast());
//        list.show();
//        list.addFirst("a11");
//        list.show();
//        list.getReverseList().show();

        list.remove("a5");
        list.show();
        list.showReserver();
        System.out.println(list.size());


        MyDoubleLikedList<String> list2 = new MyDoubleLikedList<>();
        list2.add("b1");
        list2.add("b2");
        list2.add("b3");
        list2.add("b4");
        list2.add("b5");
        list2.show();


        list.addAll(list2);
        System.out.println("---------------");
        list.show();
        list.showReserver();

    }
}
